<?php
/*
	插件初始化
*/
namespace jy_area_dian;
defined('BY_JYA') or exit('error');
function init($plugin){
	$plugin->setting=$plugin->plugin_setting('setting');
	$plugin->jichaname=$plugin->setting['jichaname']?:'级差';
	$plugin->send_types=array(
		'1'=>'配送上门',
		'2'=>'自提点自提',
		'3'=>'虚拟商品',
	);
	$plugin->pay_types=array(
		'credit'=>'打款到余额',
		'wechat'=>'打款到微信零钱',
		//'alipay'=>'打款到支付宝',
		//'union'=>'打款到银行卡',
	);
	$plugin->send_status=array(
		'0'=>'待配送',
		'1'=>'配送中',
		'2'=>'已完成配送',
		'3'=>'已转单',
		'7'=>'异常单',
	);
	$plugin->send2_status=array(
		'0'=>'待预约时间',
		'1'=>'已预约上门',
		'2'=>'已自提',
	);
	$plugin->commission_status=array(
		'0'=>'订单待完成',
		'1'=>'待结算',
		'2'=>'已结算',
	);
	$plugin->member_status=array(
		'0'=>'正常',
		'1'=>'禁用',
	);
	$plugin->agent_status=array(
		'0'=>'待审核',
		'1'=>'审核通过',
		'2'=>'审核不通过',
	);
	$plugin->balance_status=array(
		'0'=>'待审核',
		'1'=>'审核通过',
		'2'=>'审核不通过',
		'3'=>'已打款',
	);
	$plugin->commission_money_types=array(
		'1'=>'自提点分红',
	);
	$plugin->commission_types=array(
		'1'=>'不扣除运费',
		'2'=>'扣除运费',
	);
	$plugin->fee_types=array(
		'0'=>'业务奖励',
		'1'=>$plugin->jichaname.'分红',
		'2'=>'直推奖励',
	);
	$plugin->level_up_types=array(
		'member_num'=>'网点人数（人）',
		'order_price'=>'网点总金额（元）',
		'order_num'=>'网点订单数（个）',
	);
	$plugin->order_status=array(
		'0'=>'待指派',
		'1'=>$plugin->setting['order1title']?:'网点已接单',
		'2'=>$plugin->setting['order2title']?:'已入库收货点',
		'3'=>$plugin->setting['order3title']?:'已完成',
		'4'=>$plugin->setting['order4title']?:'异常订单',
		'5'=>$plugin->setting['order5title']?:'平台已取货',
		'6'=>$plugin->setting['order6title']?:'待配送给客户',
		'14'=>$plugin->setting['order14title']?:'待平台上门取',
		'15'=>$plugin->setting['order15title']?:'待上门取',
		'16'=>$plugin->setting['order16title']?:'待客户送上门',
		'17'=>$plugin->setting['order17title']?:'待送到平台',
		'18'=>$plugin->setting['order18title']?:'平台处理中',
		'19'=>$plugin->setting['order19title']?:'待送货到网点',
		'20'=>$plugin->setting['order20title']?:'待网点来平台取货',
	);
	$plugin->order_types=array(
		'0'=>'普通模式',
		'1'=>'洗衣模式',
	);
	$credit_type=$plugin->setting['credit_type'];
	if($credit_type){
		$credit_types=credit_types();
		$plugin->xuniname=$credit_types[$credit_type]?:'虚拟币';
	}else{
		$plugin->xuniname='虚拟币';
	}
}